﻿using System;

namespace MathService.Attributes
{
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
    public sealed class MinValueAttribute : Attribute
    {
        public double Value { get; set; }

        public MinValueAttribute() { }
        public MinValueAttribute(double Value) { this.Value = Value; }
    }

    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
    public sealed class MaxValueAttribute : Attribute
    {
        public double Value { get; set; }

        public MaxValueAttribute() { }
        public MaxValueAttribute(double Value) { this.Value = Value; }
    }

    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
    public sealed class IntervalValueAttribute : Attribute
    {
        public Interval Interval { set; get; }
        public IntervalValueAttribute() { }
        public IntervalValueAttribute(Interval Interval) { this.Interval = Interval; }
        public IntervalValueAttribute(double Min, double Max) { Interval = new Interval(Min, Max); }
    }

    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
    public sealed class dValueAttribute : Attribute
    {
        public double dV { get; set; }

        public dValueAttribute() { }
        public dValueAttribute(double dV) { this.dV = dV; }
    }
}
